package com.douxg.fastCoding.web.vo;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description
 * @Auther douxg
 * @Date 2020/7/31 14:43
 */
@Data
@Accessors(chain = true)
public class ElTabVo {
    private String title;
    private String name;
    private String content;

    public static ElTabVo createByValue(String name) {
        return createByValueAndLabel(name, name);
    }

    public static ElTabVo createByValueAndLabel(String name, String title) {
        return new ElTabVo().setName(name).setTitle(title);
    }

    public static List<ElTabVo> createListByValue(List<String> names) {
        List<ElTabVo> list = new ArrayList<>();
        for (String name : names) {
            list.add(createByValue(name));
        }
        return list;
    }
}
